﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AutoUp.aspx.cs" Inherits="Account_AutoUp"
    MasterPageFile="~/Masterpage/Sub_NoRight.master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ContentPlaceHolderID="MainContent" runat="server" ID="content">
    <div class="newsbox_noleft">
   <div class="newsbox_noleft_header"> <h4>QUẢN LÝ AUTO UP</h4></div>
   <div class="newsbox_noleft_content">
       <div align="center" class="">
    <table style="width: 100%">
        <tr>
            <td>
                <asp:Panel ID="pnlNoiDung" runat="server">
                    <table style="width: 100%">
                        <tr>
                            <td>
                                Danh sách thời điểm AutoUp tin rao vặt
                                <asp:HyperLink ID="hpTenTinRaoVat" runat="server" Font-Size="Larger">HyperLink</asp:HyperLink>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MaAutoUp"
                                    DataSourceID="SqlDataSource1">
                                    <Columns>
                                        <asp:BoundField DataField="MaAutoUp" HeaderText="MaAutoUp" InsertVisible="False"
                                            ReadOnly="True" SortExpression="MaAutoUp" />
                                        <asp:BoundField DataField="MaTinRaoVat" HeaderText="MaTinRaoVat" SortExpression="MaTinRaoVat" />
                                        <asp:BoundField DataField="ThoiGianUp" HeaderText="ThoiGianUp" SortExpression="ThoiGianUp" />
                                        <asp:CheckBoxField DataField="DaUp" HeaderText="DaUp" SortExpression="DaUp" />
                                    </Columns>
                                </asp:GridView>
                                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RAOVATConnectionString %>"
                                    SelectCommand="SELECT * FROM [AUTO_UP] WHERE ([MaTinRaoVat] = @MaTinRaoVat) ORDER BY [ThoiGianUp] DESC">
                                    <SelectParameters>
                                        <asp:QueryStringParameter DefaultValue="0" Name="MaTinRaoVat" QueryStringField="ID"
                                            Type="Int32" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Panel ID="pnlButtonAutoUpKhongChuKi" runat="server">
                                    <asp:Button ID="btnHienAutoUpKhongChuKi" runat="server" Text="Hiện Auto Up bài không theo chu kì"
                                        OnClick="btnHienAutoUpKhongChuKi_Click" />
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Panel ID="pnlNoiDungAutoUpKhongChuKi" runat="server" Visible="false">

                                <div>
                                <asp:Button ID="btnAnAutoUpKhongChuKi" runat="server" 
                                        Text="Ẩn Auto Up Bài không theo chu kì" onclick="btnAnAutoUpKhongChuKi_Click" />
                                </div>
                                <div>
                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                	<tr>
                                		<td>
                                            <asp:Label ID="Label4" runat="server" Text="Ngày bắt đầu Auto Up"></asp:Label>
                                        </td>
                                        <td>
                                        <asp:CalendarExtender ID="CalendarExtender2" runat="server" 
                                                TargetControlID="txtNgayBatDauKhongChuKi">
                                            </asp:CalendarExtender>
                                         <asp:TextBox ID="txtNgayBatDauKhongChuKi" runat="server" Height="18px" 
                                                Width="110px"></asp:TextBox>
                                            
                                        </td>
                                        </tr>
                                        <tr>
                                		<td>
                                            <asp:Label ID="Label31" runat="server" Text="Giờ bắt đầu Auto Up"></asp:Label>
                                            </td>
                                	        <td>
                                                <asp:DropDownList ID="ddlGioBatDauUpKhongChuKy" runat="server" Height="17px" 
                                                    Width="110px">
                                                    <asp:ListItem>0</asp:ListItem>
                                                    <asp:ListItem>1</asp:ListItem>
                                                    <asp:ListItem>2</asp:ListItem>
                                                    <asp:ListItem>3</asp:ListItem>
                                                    <asp:ListItem>4</asp:ListItem>
                                                    <asp:ListItem>5</asp:ListItem>
                                                    <asp:ListItem>6</asp:ListItem>
                                                    <asp:ListItem>7</asp:ListItem>
                                                    <asp:ListItem>8</asp:ListItem>
                                                    <asp:ListItem>9</asp:ListItem>
                                                    <asp:ListItem>10</asp:ListItem>
                                                    <asp:ListItem>11</asp:ListItem>
                                                    <asp:ListItem>12</asp:ListItem>
                                                    <asp:ListItem>13</asp:ListItem>
                                                    <asp:ListItem>14</asp:ListItem>
                                                    <asp:ListItem>15</asp:ListItem>
                                                    <asp:ListItem>16</asp:ListItem>
                                                    <asp:ListItem>17</asp:ListItem>
                                                    <asp:ListItem>18</asp:ListItem>
                                                    <asp:ListItem>19</asp:ListItem>
                                                    <asp:ListItem>20</asp:ListItem>
                                                    <asp:ListItem>21</asp:ListItem>
                                                    <asp:ListItem>22</asp:ListItem>
                                                    <asp:ListItem>23</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                	</tr>
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnUpBaiKhongChuKi" runat="server" Text="Xác nhận" 
                                                onclick="btnUpBaiKhongChuKi_Click" 
                                                onclientclick="return confirm('Bạn có chắc là muốn kích hoạt auto up?')" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblTTUpKhoCK" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                                </div>

                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Panel ID="pnlButtonAutoUpTheoChuKi" runat="server">
                                    <asp:Button ID="btnHienAutoUpTheoChuKi" runat="server" Text="Hiện Auto Up bài theo chu kì"
                                        OnClick="btnHienAutoUpTheoChuKi_Click" Visible="False" />
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Panel ID="pnlNoiDungAutoUpTheoChuKi" runat="server" Visible="false">

                                <div>
                                <asp:Button ID="btnAnAutoUpTheoChuKi" runat="server" 
                                        Text="Ẩn Auto Up Bài theo chu kì" onclick="btnAnAutoUpTheoChuKi_Click" />
                                </div>
                                <div>
                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                	<tr>
                                		<td>
                                            <asp:Label ID="Label1" runat="server" Text="Ngày bắt đầu Auto Up"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:CalendarExtender ID="CalendarExtender1" runat="server" 
                                                TargetControlID="txtNgayBatDauTheoChuKi">
                                            </asp:CalendarExtender>
                                         <asp:TextBox ID="txtNgayBatDauTheoChuKi" runat="server" Height="17px" 
                                                Width="110px"></asp:TextBox>                                            
                                        </td>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label32" runat="server" Text="Giờ bắt đầu Auto Up"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlGioBatDauUpChuKy" runat="server" Height="17px" 
                                                    Width="110px">
                                                    <asp:ListItem>0</asp:ListItem>
                                                    <asp:ListItem>1</asp:ListItem>
                                                    <asp:ListItem>2</asp:ListItem>
                                                    <asp:ListItem>3</asp:ListItem>
                                                    <asp:ListItem>4</asp:ListItem>
                                                    <asp:ListItem>5</asp:ListItem>
                                                    <asp:ListItem>6</asp:ListItem>
                                                    <asp:ListItem>7</asp:ListItem>
                                                    <asp:ListItem>8</asp:ListItem>
                                                    <asp:ListItem>9</asp:ListItem>
                                                    <asp:ListItem>10</asp:ListItem>
                                                    <asp:ListItem>11</asp:ListItem>
                                                    <asp:ListItem>12</asp:ListItem>
                                                    <asp:ListItem>13</asp:ListItem>
                                                    <asp:ListItem>14</asp:ListItem>
                                                    <asp:ListItem>15</asp:ListItem>
                                                    <asp:ListItem>16</asp:ListItem>
                                                    <asp:ListItem>17</asp:ListItem>
                                                    <asp:ListItem>18</asp:ListItem>
                                                    <asp:ListItem>19</asp:ListItem>
                                                    <asp:ListItem>20</asp:ListItem>
                                                    <asp:ListItem>21</asp:ListItem>
                                                    <asp:ListItem>22</asp:ListItem>
                                                    <asp:ListItem>23</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label2" runat="server" Text="Số lần up"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtSoLanUp" runat="server"></asp:TextBox>
                                                </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="Label3" runat="server" Text="Chu kì(phút)"></asp:Label>
                                                    </td>

                                                    <td>
                                                        <asp:TextBox ID="txtChuKi" runat="server" Height="17px" Width="110px"></asp:TextBox>
                                                    </td>
                                                    <tr>
                                                        <td>
                                                            <asp:Button ID="btnUpBaiTheoChuKi" runat="server" Text="Xác nhận" 
                                                                onclick="btnUpBaiTheoChuKi_Click" />
                                                        </td>
                                                    </tr>

                                                </tr>

                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblTTUpCK" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                </table>
                                </div>
                                </asp:Panel></td>

                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="pnlLoi" runat="server">
                    <asp:Label ID="Label30" runat="server" Text="Bạn không có quyền thực hiện chức năng này"></asp:Label>
                </asp:Panel>
            </td>
        </tr>
    </table>
    </div>
</asp:Content>
